﻿@{
    ViewBag.Title = "ParkingConfig";
    Layout = null;
    int id =int.Parse( ViewBag.pID);
    WeChatParking.Entity.ParkingInfo par = ViewBag.par == null ? new WeChatParking.Entity.ParkingInfo()
                {
                    ID=0,
                    parkId = id,
                    parkName = "",
                    lat = "0",
                    lon = "0",
                    capacityStatus = "异常",
                    totalSpace = 0,
                    freeSpace = 0,
                    businessHours = "无",
                    cityName = "无",
                    provinceName = "无",
                    districtName = "无",
                    chargingDescription = "无",
                    updateTime = DateTime.Now
                } : ViewBag.par;
   
}

<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
    <h4 class="modal-title">权限配置</h4>
</div>
<div class="modal-body">
    <form class="form-horizontal" id="form-config" method="post" action="/Admin/SaveParkingConfig">
         <input type="hidden" name="ID" value="@par.ID" />
        <input type="hidden" name="parkId" value="@par.parkId" />
        <input type="hidden" name="parkName" value="@par.parkName" />
        <div class="form-group">
            <label class="col-sm-3 control-label">车位状态：</label>
            <div class="col-sm-9">
                <input type="text" name="capacityStatus" class="form-control" placeholder="请输入车位状态" required maxlength="50" value=" @par.capacityStatus">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">总车位数：</label>
            <div class="col-sm-9">
                <input type="text" name="totalSpace" class="form-control" placeholder="请输入总车位数" required maxlength="50" value="@par.totalSpace">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">空闲车位数：</label>
            <div class="col-sm-9">
                <input type="text" name="freeSpace" class="form-control" placeholder="请输入空闲车位数" required maxlength="50" value="@par.freeSpace">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">营业时间：</label>
            <div class="col-sm-9">
                <input type="text" name="businessHours" class="form-control" placeholder="请输入营业时间,(例如:00:00-24:00)" required maxlength="50" value="@par.businessHours">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">城市名称：</label>
            <div class="col-sm-9">
                <input type="text" name="cityName" class="form-control" placeholder="请输入营业时间,城市名称" required maxlength="50" value="@par.cityName">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">省名：</label>
            <div class="col-sm-9">
                <input type="text" name="provinceName" class="form-control" placeholder="请输入省名" required maxlength="50" value="@par.provinceName">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">区名：</label>
            <div class="col-sm-9">
                <input type="text" name="districtName" class="form-control" placeholder="请输入区名" required maxlength="50" value="@par.districtName">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">纬度坐标：</label>
            <div class="col-sm-9">
                <input type="text" name="lat" class="form-control" placeholder="请输入纬度坐标" required maxlength="50" value="@par.lat">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">经度坐标：</label>
            <div class="col-sm-9">
                <input type="text" name="lon" class="form-control" placeholder="请输入经度坐标" required maxlength="50" value="@par.lon">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">收费标准：</label>
            <div class="col-sm-9">
                <input type="text" name="chargingDescription" class="form-control" placeholder="请输入收费标准" required maxlength="50" value="@par.chargingDescription">
            </div>
        </div>
    </form>
</div>
<div class="modal-footer">
    <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
    <button type="button" class="btn btn-primary" id="btn-config-save">保存</button>
</div>

